Resynchronization of mirrored storage devices

ABSTRACT

In one embodiment, a first storage device and a second storage device form a mirror. When the first storage device loses synchronization with the second storage device, data present in the second storage device but not in the first storage device are identified. The identified data are then copied to the first storage device.

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application is a continuation-in-part of U.S. application Ser. No. 09/684,487 (Atty. Docket No. 103.1031/P00-1031), filed on 10/4/2000 by Srinivasan Viswanathan and Steven R. Kleiman, entitled “Recovery of File System Data in File Servers Mirrored File System Volumes”. The just mentioned U.S. application is incorporated herein by reference in its entirety.

BACKGROUND OF THE INVENTION

[0002] 1. Field Of The Invention

[0003] The present invention relates generally to computer systems, and more particularly but not exclusively to file systems and storage devices.

[0004] 2. Description Of The Background Art

[0005] Storage devices are employed to store data that are accessed by computer systems. Examples of storage devices include volatile and non-volatile memory, floppy drives, hard disk drives, tape drives, optical drives, etc. A storage device may be locally attached to an input/output (I/O) channel of a computer. For example, a hard disk drive may be connected to a computer's disk controller. A storage device may also be accessible over a network. Examples of such a storage device include network attached storage (NAS) and storage area network (SAN) devices. A storage device may be a single stand-alone component or be comprised of a system of storage devices such as in the case of Redundant Array Of Inexpensive Disks (RAID) groups and some Direct Access Storage Devices (DASD).

[0006] For mission-critical applications requiring high availability of stored data, various techniques for enhancing data reliability are typically employed. One such technique is to provide a “mirror” for each storage device. In a mirror arrangement, data are written to at least two storage devices. Thus, data may be read from either of the two storage devices so long as the two devices are operational and contain the same data. That is, either of the two storage devices may process read requests so long as the two devices are in synchronization.

[0007] When one of the storage devices fails, its mirror may be used to continue processing read and write requests. However, this also means that the failing storage device will be out of synchronization with its mirror. To avoid losing data in the event the mirror also fails, it is desirable to resynchronize the two storage devices as soon as the failing storage device becomes operational. Unfortunately, prior techniques for resynchronizing mirrored storage devices take a long time and consume a relatively large amount of processing time and 1/O bandwidth. These not only increase the probability of data loss, but also result in performance degradation.

SUMMARY

[0008] In one embodiment, a first storage device and a second storage device form a mirrored pair of storage devices. When the first storage device loses synchronization with the second storage device, data present in the second storage device but not in the first storage device are identified. The identified data are then copied to the first storage device.

[0009] In one embodiment, a method of resynchronizing mirrored storage devices includes the act of creating a first storage usage information when both storage devices are accessible. When one of the storage devices goes down and then comes back up, a second storage usage information is created. A difference between the first storage usage information and the second storage usage information is determined and then used to resynchronize the previously down storage device with its mirror.

[0010] These and other features of the present invention will be readily apparent to persons of ordinary skill in the art upon reading the entirety of this disclosure, which includes the accompanying drawings and claims.

to DESCRIPTION OF THE DRAWINGS

[0011]FIG. 1 shows a schematic diagram of an example file layout.

[0012] FIGS. 2A-2D show schematic diagrams of inode files in the file layout of FIG. 1.

[0013] FIGS. 3A-3C show schematic diagrams illustrating the creation of a snapshot in the file layout of FIG. 1.

[0014]FIG. 4 shows a schematic diagram of a computing environment in accordance with an embodiment of the present invention.

[0015]FIG. 5 shows a logical diagram illustrating the relationship between a file system, a storage device manager, and a storage system in accordance with an embodiment of the present invention.

[0016]FIG. 6 shows a state diagram of a mirror in accordance with an embodiment of the present invention.

[0017]FIG. 7 shows a flow diagram of a method of resynchronizing a mirrored storage device in accordance with an embodiment of the present invention.

[0018]FIGS. 8A and 8B show schematic diagrams further illustrating an action in the flow diagram of FIG. 7.

[0019] The use of the same reference label in different drawings indicates the same or like components.

DETAILED DESCRIPTION

[0020] In the present disclosure, numerous specific details are provided, such as examples of systems, components, and methods to provide a thorough understanding of embodiments of the invention. Persons of ordinary skill in the art will recognize, however, that the invention can be practiced without one or more of the specific details. In other instances, well-known details are not shown or described to avoid obscuring aspects of the invention.

[0021] Referring now to FIG. 1, there is shown a schematic diagram of an example file layout 150. File layout 150 may be adopted by a file system to organize files. Similar file layouts are also disclosed in the following commonly-assigned disclosures, which are incorporated herein by reference in their entirety: (a) U.S. Pat. No. 6,289,356, filed on Sep. 14, 1998; (b) U.S. Pat. No. 5,963,962, filed on Jun. 30, 1998; and (c) U.S. Pat. No. 5,819,292, filed on May. 31, 1995. It should be understood, however, that the present invention may also be adapted for use with other file layouts.

[0022] As shown in FIG. 1, file layout 150 has a tree structure with a root inode 100 as a base. Root inode 100 includes multiple blocks for describing one or more inode files 110 (i.e., 110A, 110B, . . . ). Each inode file 110 contains information about a file in file layout 150. A file may comprise one or more blocks of data, with each block being a storage location in a storage device.

[0023] As will be explained below, an inode file 110 may contain data or point to blocks containing data. Thus, a file may be accessed by consulting root inode 100 to find the inode file 110 that contains or points to the file's data. Using FIG. 1 as an example, data file 122 is stored in one or more blocks pointed to by inode 110B; inode 110B is in turn identified by root inode 100.

[0024] File layout 150 also includes a block map file 120 and an inode map file 121. Block map file 120 identifies free (i.e., unused) blocks, while inode map file 121 identifies free inodes. Block map file 120 and inode map file 121 may be accessed just like any other file in file layout 150. In other words, block map file 120 and inode map file 121 may be stored in blocks pointed to by an inode file 110, which is identified by root inode 100.

[0025] In one embodiment, root inode 100 is stored in a predetermined location in a storage device. This facilitates finding root inode 100 upon system boot-up. Because block map file 120, inode map file 121, and inode files 110 may be found by consulting root inode 100 as described above, they may be stored anywhere in the storage device.

[0026] Referring to FIG. 2A, there is shown a schematic diagram of an inode file 110 identified by a root inode 100. An inode file 110 includes a block 111 for storing general inode information such as a file's size, owner, permissions, etc. An inode file 110 also includes one or more blocks 112 (i.e., 112A, 112B, . . . ). Depending on the size of the file, blocks 112 may contain the file's data or pointers to the file's data. In the example of FIG. 2A, the file is small enough to fit all of its data in blocks 112.

[0027] In one embodiment, an inode file 110 includes 16 blocks 112, with each block 112 accommodating 4 bytes (i.e., 32 bits). Thus, in the just mentioned embodiment, files having a size of 64 bytes (i.e., 4-bytes ×16) or less may be stored directly in an inode file 110.

[0028]FIG. 2B shows a schematic diagram of an inode file 110 that contains pointers in its blocks 112. In the example of FIG.2B, a pointer in a block 112 points to a data block 210 (i.e., 210A, 210B , . . . ) containing data. This allows an inode file 110 to accommodate files that are too large to fit in the inode file itself. In one embodiment, each of 16 blocks 112 may point to a 4 KB (kilo-byte) data block 210. Thus, in the just mentioned embodiment, an inode file 110 may accommodate files having a size of 64 KB (i.e.,16 ×4 KB) or less.

[0029]FIG. 2C shows a schematic diagram of another inode file 110 that contains pointers in its blocks 112. Each of the blocks 112 points to indirect blocks 220 (i.e., 220A, 220B , . . . ), each of which has blocks that point to a data block 230 (i.e., 230A, 230B , . . . ) containing data. Pointing to an indirect block 220 allows an inode file 110 to accommodate larger files. In one embodiment, an inode file 110 has 16 blocks 112 that each point to an indirect block 220; each indirect block 220 in turn has 1024 blocks that each point to a 4 KB data block 230. Thus, in the just mentioned embodiment, an inode file 110 may accommodate files having a size of 64 MB (mega-bytes) (i.e., 16 ×1024 ×4KB) or less.

[0030] As can be appreciated, an inode file 110 may have several levels of indirection to accommodate even larger files. For example, FIG. 2D shows a schematic diagram of an inode file 110 that points to double indirect blocks 240 (i.e., 240A, 240B , . . . ), which point to single indirect blocks 250 (i.e., 250A, 250B , . . . ), which in turn point to data blocks 260 (i.e., 260A, 260B , . . . ). In one embodiment, an inode file 110 has 16 blocks 112 that each points to a double indirect block 240 containing 1024 blocks; each block in a double indirect block 240 points to a single indirect block 250 that contains 1024 blocks; each block in a single indirect block 250 points to a 4 KB data block 260. Thus, in the just mentioned embodiment, an inode file 110 may accommodate files having a size of 64 GB (giga-bytes) (i.e., 16 ×1024 ×1024 ×4 KB) or less.

[0031] Referring now to FIG. 3A, there is shown a schematic diagram of a root inode 100 with one or more branches 310 (i.e., 310A, 310B , . . . ). FIG. 3A and the following FIGS. 3B and 3C do not show the details of each branch from a root inode 100 for clarity of illustration. Each branch 310 may include an inode file plus one or more levels of indirection to data blocks, if any.

[0032]FIG. 3B shows a schematic diagram of a snapshot 300 created by copying a root inode 100. It is to be noted that “Snapshot” is a trademark of Network Appliance, Inc. It is used for purposes of this disclosure to designate a persistent consistency point (CP) image. A persistent consistency point image (PCPI) is a point-in-time representation of the storage system, and more particularly, of the active file system, stored on a storage device (e.g., on disk) or in other persistent memory and having a name or other unique identifier that distinguishes it from other PCPIs taken at other points in time. A PCPI can also include other information (metadata) about the active file system at the particular point in time for which the image is taken. The terms “PCPI” and “snapshot” shall be used interchangeably through out this disclosure without derogation of Network Appliance's trademark rights.

[0033] A snapshot 300, being a copy of a root inode 100, identifies all blocks identified by the root inode 100 at the time snapshot 300 was created. Because a snapshot 300 identifies but does not copy branches 310, a snapshot 300 does not consume a large amount of storage space. Generally speaking, a snapshot 300 provides storage usage information at a given moment in time.

[0034]FIG. 3C shows a schematic diagram illustrating what happens when data in a 103 branch 310 are modified by a write command. In one embodiment, writes may only be performed on unused blocks. That is, a used block is not overwritten when its data are modified; instead, an unused block is allocated to contain the modified data. Using FIG. 3C as an example, modifying data in branch 310E results in the creation of a new branch 311 containing the modified data. Branch 311 is created on new, unused blocks. The old branch 310E remains in the storage device and is still identified by snapshot 300. Root inode 100, on the other hand, breaks its pointer to branch 310E and now points to the new branch 311. Because branch 310E is still identified by snapshot 300, its data blocks may be readily recovered if desired.

[0035] As data identified by root inode 100 are modified, the number of retained old blocks may start to consume a large amount storage space. Thus, depending on the application, a snapshot 300 may be replaced by a new snapshot 300 from time to time to release old blocks, thereby making them available for new writes.

[0036] A consistency point count may be atomically increased every time a consistency point is established. For example, a consistency point count may be increased by one every time a snapshot 300 is created to establish a PCPI. When a file system becomes corrupted (e.g., root inode 100 lost information after an unclean shutdown), the PCPI (which is a snapshot 300 in this example) may be used to recreate the file system. As can be appreciated, a consistency point count gives an indication of how up to date a file system is. The higher the consistency point count, the more up to date the file system. For example, a file system with a consistency point count of 7 is more up to date than a version of that file system with a consistency point count of 4.

[0037] Turning now to FIG. 4, there is shown a schematic diagram of a computing environment in accordance with an embodiment of the present invention. In the example of FIG. 4, one or more computers 401 (i.e., 401A, 401B, . . . . ) are coupled to a filer 400 over a network 402. A computer 401 may be any type of data processing device capable of sending write and read requests to filer 400. A computer 401 may be, without limitation, a personal computer, mini-computer, mainframe computer, portable computer, workstation, wireless terminal, personal digital assistant, cellular phone, etc.

[0038] Network 402 may include various types of communication networks such as wide area networks, local area networks, the Internet, etc. Other nodes on network 402 such as gateways, routers, bridges, firewalls, etc. are not depicted in FIG. 4 for clarity of illustration.

[0039] Filer 400 provides data storage services over network 402. In one embodiment, filer 400 processes data read and write requests from a computer 401. Of course, filer 400 does not necessarily have to be accessible over network 402. Depending on the application, a filer 400 may also be locally attached to an I/O channel of a computer 401, for example.

[0040] As shown in FIG. 4, filer 400 may include a network interface 410, a storage operating system 450, and a storage system 460. Storage operating system 450 may further include a file system 452 and a storage device manager 454. Storage system 460 may include one or more storage devices. Components of filer 400 may be implemented in hardware, software, and/or firmware. For example, filer 400 may be a computer having one or more processors running computer-readable program code of storage operating system 450 in memory. Software components of filer 400 may be stored on computer-readable storage media (e.g., memories, CD-ROMS, tapes, disks, ZIP drive , . . . ) or transmitted over wired or wireless link to a computer 401.

[0041] Network interface 410 includes components for receiving storage-related service requests over network 402. Network interface 410 forwards a received service request to storage operating system 450, which processes the request by reading data from storage system 460 in the case of a read request, or by writing data to storage system 460 in the case of a write request. Data read from storage system 460 are transmitted over network 402 to the requesting computer 401. Similarly, data to be written to storage system 460 are received over network 402 from a computer 401.

[0042]FIG. 5 shows a logical diagram further illustrating the relationship between a file system 452, a storage device manager 454, and a storage system 460 in accordance with an embodiment of the present invention. In one embodiment, file system 452 and storage device manager 454 are implemented in software while storage system 460 is implemented in hardware. As can be appreciated, however, file system 452, storage device manager 454, and storage system 460 may be implemented in hardware, software, and/or firmware. For example, data structures, tables, and maps may be employed to define the logical interconnection between file system 452 and storage device manager 454. As another example, storage device manager 454 and storage system 460 may communicate via a disk controller.

[0043] File system 452 manages files that are stored in storage system 460. In one embodiment, file system 452 uses a file layout 150 (see FIG. 1) to organize files. That is, in one embodiment, file system 452 views files as a tree of blocks with a root inode as a base. File system 452 is capable of creating snapshots and consistency points in a manner previously described. In one embodiment, file system 452 organizes files in accordance with the Write-Anywhere-File Layout (WAFL) disclosed in the incorporated disclosures U.S. Pat. Nos. 6,289,356, 5,963,962, and 5,819,292. However, the present invention is not so limited and may also be used with other file systems and layouts.

[0044] Storage device manager 454 manages the storage devices in storage system 460. Storage device manager 454 receives read and write commands from file system 452 and processes the commands by accordingly accessing storage system 460. Storage device manager 454 takes a block's logical address from file system 452 and translates that logical address to a physical address in one or more storage devices in storage system 460. In one embodiment, storage device manager 454 manages storage devices in accordance with RAID level 4, and accordingly stripes data blocks across storage devices and uses separate parity storage devices. It should be understood, however, that the present invention may also be used with data storage architectures other than RAID level 4. For example, embodiments of the present invention may be used with other RAID levels, DASD's, and non-arrayed storage devices.

[0045] As shown in FIG. 5, storage device manager 454 is logically organized as a tree of objects that include a volume 501, a mirror 502, plexes 503 (i.e., 503A, 503B), and RAID groups 504-507. It is to be noted that implementing a mirror in a logical layer below file system 452 advantageously allows for a relatively transparent fail-over mechanism. For example, because file system 452 does not necessarily have to know of the existence of the mirror, a failing plex 503 does not have to be reported to file to system 452. When a plex fails, file system 452 may still read and write data as before. This minimizes disruption to file system 452 and also simplifies its design.

[0046] Still referring to FIG. 5, volume 501 represents a file system. Mirror 502 is one level below volume 501 and manages a pair of mirrored plexes 503. Plex 503A is a duplicate of plex 503B, and vice versa. Each plex 503 represents a full copy of the file system of volume 501. In one embodiment, consistency points are established from time to time for each plex 503. As will be described further below, this allows storage device manager 454 to determine which plex is more up to date in the event both plexes go down and one of them needs to be resynchronized with the other.

[0047] Below each plex 503 is one or more RAID groups that have associated storage devices in storage system 460. In the example of FIG. 5, storage devices 511-513 belong to RAID group 504, storage devices 514-516 belong to RAID group 505, storage devices 517-519 belong to RAID group 506, and storage devices 520-522 belong to RAID group 507. RAID group 504 mirrors RAID group 506, while RAID group 505 mirrors RAID group 507. As can be appreciated, storage devices 511-522 do not have to be housed in the same cabinet or facility. For example, storage devices 511-516 may be located in a data center in one city, while storage devices 517-522 may be in another data center in another city. This advantageously allows data to remain available even if a facility housing one set of storage devices is hit by a disaster (e.g., fire, earthquake).

[0048] In one embodiment, storage devices 511-522 include hard disk drives communicating with storage device manager 454 over a Fiber Channel Arbitrated Loop link and configured in accordance with RAID level 4. Implementing a mirror with RAID level 4 significantly improves data availability. Ordinarily, RAID level 4 does not include mirroring. Thus, although a storage system according to RAID level 4 may survive a single disk failure, it may not be able to survive double disk failures. Implementing a mirror with RAID level 4 improves data availability by providing back up copies in the event of a double disk failure in one of the RAID groups.

[0049] Because plex 503A and plex 503B mirror each other, data may be accessed through either plex 503A or plex 503B. This allows data to be accessed from a surviving plex in the event one of the plexes goes down and becomes inaccessible. This is particularly advantageous in mission-critical applications where a high degree of data availability is required. To further improve data availability, plex 503A and plex 503B may also utilize separate pieces of hardware to communicate with storage system 460.

[0050]FIG. 6 shows a state diagram of mirror 502 in accordance with an embodiment of the present invention. At any given moment, mirror 502 may be in normal (state 601), degraded (state 602), or resync (state 603) state. Mirror 502 is in the normal state when both plexes are working and online. In the normal state, data may be read from either plex. Using FIG. 5 as an example, a block in storage device 511 may be read and passed through RAID group 504, plex 503A, mirror 502, volume 501, and then to file system 452. Alternatively, the same block may be read from storage device 517 and passed through RAID group 506, plex 503B, mirror 502, volume 501, and then to file system 452.

[0051] In the normal state, data are written to both plexes in response to a write command from file system 452. The writing of data to both plexes may progress simultaneously. Data may also be written to each plex sequentially. For example, write data received from file system 452 may be forwarded by mirror 502 to an available plex. After the available plex confirms that the data were successfully written to storage system 460, mirror 502 may then forward the same data to the other plex. For example, the data may first be stored through plex 503A. Once plex 503A sends a confirmation that the data were successfully written to storage system 460, mirror 502 may then forward the same data to plex 503B. In response, plex 503B may initiate writing of the data to storage system 460.

[0052] From the normal state, mirror 502 may go to the degraded state when either plex 503A or plex 503B goes down. A plex 503 may go down for a variety of reasons including when its associated storage devices fail, are placed offline, etc. A down plex loses synchronization with its mirror as time passes. The longer the down time, the more the down plex becomes outdated.

[0053] In the degraded state, read and write commands are processed by the surviving plex. For example, when plex 503B goes down and is survived by plex 503A, plex 503A assumes responsibility for processing all read and write commands. As can be appreciated, having a mirrored pair of plexes allows storage device manager 454 to continue to operate even after a plex goes down.

[0054] From the degraded state, mirror 502 goes to the resync state when the down plex (now a “previously down plex”) becomes operational again. In the resync state, the previously down plex is resynchronized with the surviving plex. In other words, during the resync state, information in the previously down plex is updated to match that in the surviving plex. A technique for resynchronizing a previously down plex is later described in connection with FIG. 7. In one embodiment, resynchronization of a previously down plex with a surviving plex is performed by storage device manager 454. Performing resynchronization in a logical layer below file system 452 allows the resynchronization process to be relatively transparent to file system 452. This advantageously minimizes disruption to file system 452.

[0055] In the resync state, data are read from the surviving plex because the previously down plex may not yet have the most current data.

[0056] As mentioned, in one embodiment, data writes may only be performed on unused blocks. Because an unused block by definition has not been allocated in either plex while one of the plexes is down, data may be written to both plexes even if the mirror is still in the resync state. In other words, data may be written to the previously down plex even while it is still being resynchronized. As can be appreciated, the capability to write to the previously down plex while it is being resynchronized advantageously reduces the complexity of the resynchronization process.

[0057] From the resync state, mirror 502 returns to the normal state after the previously down plex is resynchronized with the surviving plex.

[0058]FIG. 7 shows a flow diagram of a method for resynchronizing a mirrored storage device in accordance with an embodiment of the present invention. In action 702, a snapshot arbitrarily referred to as a “base snapshot” is created by file system 452 at the request of storage device manager 454. The base snapshot, like a snapshot 300 (see FIG. 3), includes information about files in a file system.

[0059] In action 704 to action 702, at the request of storage device manager 454, file system 452 periodically creates a new base snapshot (and deletes the old one) while both plexes remain accessible. When one of the plexes goes down and becomes inaccessible, mirror 502 goes to the degraded state as indicated in action 706. In action 708 to action 706, mirror 502 remains in the degraded state while one of the plexes remains down.

[0060] In action 708 to action 710, mirror 502 goes to the resync state when the down plex becomes operational. In action 712, another snapshot arbitrarily referred to as a “resync snapshot” is created by file system 452 at the request of storage device manager 454. The resync snapshot is just like a snapshot 300 except that it is created when mirror 502 is in the resync state. Because file system 452, in one embodiment, only sees the most current plex, the resync snapshot is a copy of a root inode in the surviving plex.

[0061] In action 714, the difference between the base snapshot and the resync snapshot is determined. In one embodiment, file system 452 determines the difference by:

[0062] (a) reading the base snapshot and the resync snapshot;

[0063] (b) identifying blocks composing the base snapshot and blocks composing the resync snapshot; and

[0064] (c) finding blocks that are in the resync snapshot but not in the base snapshot. Note that the base snapshot is created at an earlier time when both plexes are up (normal state), whereas the resync snapshot is created at a later time when a plex that has gone down goes back up (resync state). Thus, the difference between the base and resync snapshots represents data that were written to the surviving plex while mirror 502 is in the degraded state.

[0065]FIGS. 8A and 8B further illustrate action 714. FIGS. 8A and 8B represent storage locations of a storage device, with each cell representing one or more blocks. In FIG. 8A, cell A1 holds a base snapshot 801. Base snapshot 801 identifies blocks in cells A2, B3, and C1. In FIG. 8B, cell C4 holds a resync snapshot 802 created while mirror 502 is in the resync state. Like base snapshot 801, resync snapshot 802 identifies blocks in cells A2, B3, and C1. Resync snapshot 802 additionally identifies blocks in cell D2. Thus, the blocks in cell D2 compose the difference between base snapshot 801 and resync snapshot 802.

[0066] Continuing in action 716 of FIG. 7, the difference between the base and resync snapshots is copied to the formerly down plex. In one embodiment, this is performed by storage device manager 454 by copying to the formerly down plex the blocks that are in the resync snapshot but not in the base snapshot. Using FIG. 8B as an example, blocks in cell D2 are copied to the formerly down plex. Advantageously, this speeds up the resynchronization process and thus shortens the period when only one plex is operational. Also, compared with prior techniques where all blocks of the surviving plex are copied to a formerly down plex, copying the difference to the formerly down plex consumes less processing time and I/O bandwidth.

[0067] In action 718, the resync snapshot is made the base snapshot. In action 719, the previous base snapshot is deleted. Thereafter, mirror 502 goes to the normal state as indicated in action 720. The cycle then continues with file system 452 periodically creating base snapshots while both plexes remain accessible.

[0068] It is to be noted that the flow diagram of FIG. 7 may also be used in the event both plexes go down. In that case, the plex with the higher consistency point count is designated the surviving plex while the other plex is designated the down plex. Thereafter, the down plex is resynchronized with the surviving plex as in FIG. 7. For example, if plexes 503A and 503B both go down and plex 503A has a higher consistency point count than plex 503B, plex 503A is designated the surviving plex while plex 503B is designated the down plex. When both plexes become operational again, plex 503B may then be resynchronized with plex 503A as in actions 710, 712, 714, 716, 718, etc.

[0069] Improved techniques for resynchronizing mirrored storage devices have been disclosed. While specific embodiments have been provided, it is to be understood that these embodiments are for illustration purposes and not limiting. Many additional embodiments will be apparent to persons of ordinary skill in the art reading this disclosure. Thus, the present invention is limited only by the following claims. 

What is claimed is:
 1. A method of resynchronizing mirrored storage devices, the method comprising: mirroring a first storage apparatus with a second storage apparatus; determining a difference between data stored in the second storage apparatus and data stored in the first storage apparatus; and in the event the first storage apparatus loses synchronization with the second storage apparatus, resynchronizing the first storage apparatus by copying the difference to the first storage apparatus.
 2. The method of claim 1 further comprising: servicing data write requests by writing data to the first storage apparatus while resynchronizing the first storage apparatus.
 3. The method of claim 1 further comprising: servicing data read requests by reading data from the second storage apparatus while resynchronizing the first storage apparatus.
 4. The method of claim 1 wherein determining the difference between data stored in the second storage apparatus and data stored in the first storage apparatus further comprises: reading a first storage usage information and a second storage usage information; identifying data in the first storage usage information and data in the second storage usage information; and finding blocks that correspond to data that are in the second storage usage information but not in the first storage usage information.
 5. The method of claim 1 wherein the first storage apparatus and the second storage apparatus are configured in accordance with RAID level
 4. 6. A system comprising: a first storage device and a second storage device forming a mirrored pair of storage devices; a storage device manager configured to manage the first storage device and the second storage device; and wherein the storage device manager is configured to resynchronize the second storage device with data blocks allocated in the first storage device but not in the second storage device.
 7. The system of claim 6 further comprising: a file system at a logical layer above the storage device manager and configured to send storage-related commands to the storage device manager.
 8. The system of claim 7 further comprising: a network interface in communication with the file system, the network interface being configured to receive storage-related requests over a computer network.
 9. The system of claim 6 wherein the first storage device and the second storage device are configured in accordance with RAID level
 4. 10. The system of claim 6 wherein the storage device manager is configured to service storage-related requests while resynchronizing the second storage device.
 11. A method of resynchronizing mirrored storage devices, the method comprising: creating a first storage usage information at a first moment and a second storage usage information at a second moment; determining a difference between the first storage usage information and the second storage usage information; and based on the difference, resynchronizing a first storage device that forms a mirror with a second storage device.
 12. The method of claim 11 further comprising: servicing data write requests by writing data to the first storage device while resynchronizing the first storage device.
 13. The method of claim 11 further comprising: servicing data read requests by reading data from the second storage device while resynchronizing the first storage device.
 14. The method of claim 11 wherein determining the difference between the first storage usage information and the second storage usage information further comprises: reading the first storage usage information and the second storage usage information; identifying blocks in the first storage usage information and blocks in the second storage usage information; and finding blocks that are in the second storage usage information but not in the first storage usage information.
 15. The method of claim 11 wherein the mirror is implemented in a logical layer below a file system.
 16. The method of claim 11 wherein the first storage device and the second storage device are configured in accordance with RAID level
 4. 17. The method of claim 11 further comprising: going from a normal state to a degraded state when the first storage device becomes inaccessible; going from the degraded state to a resync state when resynchronizing the first storage device; and going from the resync state to the normal state after resynchronizing the first storage device.
 18. The method of claim 17 further comprising: writing new data to the first storage device while in the resync state.
 19. The method of claim 17 further comprising: reading data from the second storage device while in the resync state.
 20. The method of claim 17 wherein the first storage usage information is created while in the normal state and the second storage usage information is created while in the resync state.
 21. A computer-readable storage medium comprising: computer-readable program code for creating a first storage usage information and a second storage usage information; computer-readable program code for determining a difference between the first storage usage information and the second storage usage information; and computer-readable program code for resynchronizing a previously down storage device with another storage device based on the difference.
 22. A method of resynchronizing a storage device, the method comprising: creating a first storage usage information when a first storage device and a second device that form a mirror are both accessible; creating a second storage usage information after the first storage device goes down and comes back up; determining a difference between the first storage usage information and the second storage information; resynchronizing the first storage device with the second storage device based on the difference; and servicing data write requests by writing data to the first storage device while resynchronizing the first storage device.
 23. The method of claim 22 further comprising: servicing data read requests by reading data from the second storage device while resynchronizing the first storage device.
 24. The method of claim 22 wherein the first storage device and the second storage device are configured in accordance with RAID level
 4. 25. A method of resynchronizing mirrored storage devices, the method comprising: keeping a mirror in a normal state while a first storage device and a second storage device of the mirror are both accessible; transitioning the mirror from the normal state to a degraded state when the second storage device becomes inaccessible; transitioning the mirror from the degraded state to a resync state when the second storage device becomes accessible; determining a difference between data stored in the first storage device and data stored in the second storage device; and transitioning the mirror from the resync state to the normal state after the difference is copied to the second storage device.
 26. The method of claim 25 wherein determining the difference between data stored in the first storage device and data stored in the second storage device comprises: identifying data blocks in the first storage device that are not in the second storage device.
 27. The method of claim 25 wherein determining the difference between data stored in the first storage device and data stored in the second storage device comprises: identifying data blocks stored in the first storage device and the second storage device while the mirror is in the normal state to create a first storage usage information; identifying data blocks stored in the first storage device while the mirror is in the resync state to create a second storage usage information; and determining a difference between the first storage usage information and the second storage usage information.
 28. The method of claim 25 further comprising: in response to a write command, writing data to the second storage device while the mirror is in the resync state.
 29. A system for providing data storage services over a computer network, the system comprising: a file system; a storage device manager configured to service data access requests from the file system, the storage device manager configured to form a mirror with a first storage device and a second storage device; and wherein the storage device manager is configured to resynchronize the second storage device with data determined to be in the first storage device but not in the second storage device.
 30. The system of claim 29 wherein the first storage and the second storage device are configured in accordance with RAID level
 4. 31. The system of claim 29 wherein the first storage device and the second storage device are not housed in the same facility.
 32. A method of resynchronizing mirrored storage devices, the method comprising: mirroring a first group of storage devices with a second group of storage devices; determining a difference between data stored in the second group of storage devices and data stored in the second group of storage devices; and in the event the first group of storage devices loses synchronization with the second group of storage devices, resynchronizing the first group of storage devices by copying the difference to the first group of storage devices.
 33. The method of claim 32 further comprising: servicing data write requests by writing data to the first group of storage devices while resynchronizing the first group of storage devices.
 34. The method of claim 32 further comprising: servicing data read requests by reading data from the second group of storage devices while resynchronizing the first group of storage devices.
 35. The method of claim 32 wherein determining the difference between data stored in the second group of storage devices and data stored in the second group of storage devices further comprises: reading a first storage usage information and a second storage usage information; identifying data in the first storage usage information and data in the second storage usage information; and finding blocks that correspond to data that are in the second storage usage information but not in the first storage usage information.
 36. The method of claim 32 wherein the first group of storage devices and the second group of storage devices are configured in accordance with RAID level
 4. 